<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['member.list.title']}">
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="986">
		<h:outputLabel for="cname" value="#{messages['registration.no']}" styleClass="standardText_Label" />
		<t:inputText id="cname"  size="30" maxlength="50" styleClass="standardText" value="#{adminMemberMgmtBean.regno}"></t:inputText>
		
		<t:outputText></t:outputText>
		<h:commandButton value="#{messages['search']}" styleClass="button"  immediate="true" action="#{adminMemberMgmtBean.searchAction}"></h:commandButton>
		
	</t:panelGrid>
	
	<rich:spacer height="20" />
	
	<rich:dataTable id="data" var="member" value="#{adminMemberMgmtBean.memberList}" rows="10" width="99%" rowKeyVar="rowNo">
		<rich:column style="text-align:center;width:20%;">
			<f:facet name="header">
				<h:outputText value="#{messages['registration.no']}"></h:outputText>
			</f:facet>
			<h:commandLink value="#{member.memberRegNo}" action="#{adminMemberMgmtBean.editMemberAction}" 
			actionListener="#{adminMemberMgmtBean.editMemberActionListener}" immediate="true"></h:commandLink>
			<f:param id="cmemberId" value="#{member.memberId}"/>
		</rich:column>
		<rich:column style="text-align:center;width:20%;">
			<f:facet name="header">
				<h:outputText value="#{messages['membership.no']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{member.membershipNo}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:20%;">
			<f:facet name="header">
				<h:outputText value="#{messages['member.type']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{member.memberTypeLabel}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['status']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{member.statusLabel}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:20%;">
			<f:facet name="header">
				<h:outputText value="#{messages['view.agreement.transaction']}"></h:outputText>
			</f:facet>
			<h:commandButton value="#{messages['action']}" action="#{adminMemberMgmtBean.viewAgreementAction}" styleClass="button" actionListener="#{adminMemberMgmtBean.viewAgreementActionListener}"></h:commandButton>
			<f:param id="amemberId" value="#{member.memberId}"/>
		</rich:column>
		<rich:column style="text-align:center;width:20%;">
			<f:facet name="header">
				<h:outputText value="Agreement Transfer"></h:outputText>
			</f:facet>
			<h:commandButton value="Transfer" action="#{adminMemberMgmtBean.transferAction}" styleClass="button" actionListener="#{adminMemberMgmtBean.transferActionListener}"></h:commandButton>
			<f:param id="amemberId2" value="#{member.memberId}"/>
		</rich:column>
		<rich:column style="text-align:center;width:20%;">
			<f:facet name="header">
				<h:outputText value="Terminate Agreement"></h:outputText>
			</f:facet>
			<h:commandButton value="Terminate" action="#{adminMemberMgmtBean.terminateAction}" styleClass="button" actionListener="#{adminMemberMgmtBean.terminateActionListener}"></h:commandButton>
			<f:param id="amemberId3" value="#{member.memberId}"/>
		</rich:column>
		
	</rich:dataTable>
	
	<rich:spacer height="30" />
	
	<rich:datascroller align="left"  for="data" maxPages="20" />

<%-- 
	<rich:spacer height="30" />
	
	<t:panelGrid columns="1" width="100%">
		<t:panelGroup>
		 	<h:commandButton value="#{messages['create.company.prospect']}" styleClass="button"  immediate="true" action="#{adminSelectMembershipBean.navCompSelectAction}"></h:commandButton>
		 	<f:verbatim>&nbsp;</f:verbatim>
		 	<h:commandButton value="#{messages['create.individual.prospect']}" styleClass="button"  immediate="true" action="#{adminSelectMembershipBean.navIndSelectAction}"></h:commandButton>
	--%>
	
		 	<%-- 
		 	<f:verbatim>&nbsp;</f:verbatim>
   			<h:commandButton value="#{messages['cancel']}" styleClass="button" immediate="true" action="#{adminMemberMgmtBean.backAction}"></h:commandButton>
   			--%>
<%-- 
   		</t:panelGroup>
	</t:panelGrid>
	--%>
</rich:panel>
